﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Mimoza.PluginLayer
{
    /// <summary>
    /// Interface of plugin. Uses for configure policy in console.	
    /// </summary>
    public interface IConfigPlugin
    {
        /// <summary>
        /// Identity of plugin. This identity uses on host side as path for 
        /// execute part of plugin. Format AssemblyName.FullClassName 
        /// ( for example "WinCESystem.Mimoza.System.Screen" )
        /// If plugin configurates more than one execute plugin method retruns
        /// list of identity separated by ';' (see helper Common.ArrayToString)
        /// </summary>        
        string Identity { get; }

        /// <summary>
        /// Name of plugin. This value should be localized.
        /// ( for example "Screen" )
        /// </summary>
        string Name { get; }

        /// <summary>
        /// Brief description of plugin. This value should be localized.
        /// ( for example "Setting for screen of WinCE: reolution and color depth." )
        /// </summary>
        string Description { get; }

        /// <summary>
        /// Flag for hardware type of plugin. 
        /// For example screnn is hardware plugin.
        /// </summary>
        bool IsHardware { get; }

        /// <summary>
        /// Icon of plugin. This icon uses in console for representetion.
        /// </summary>        
        System.Drawing.Icon Icon { get; }

        /// <summary>
        /// This config can by multiplied in hierarchy of containers, 
        /// overwise configure will be replaced on bottom levels of hierarchy.
        /// </summary>
        bool IsMultiple { get; }

        /// <summary>
        /// Serialize user object to string.
        /// </summary>
        /// <param name="userData">Point to user object</param>
        /// <returns>Serialized object in string</returns>
        string Serialize(object userData);

        /// <summary>
        /// Deserialize user object from string
        /// </summary>
        /// <param name="streamFrom">String with serilizaed user data</param>
        /// <returns>Deserialized user data</returns>
        object Deserialize(string stringFrom);

//#if !WindowsCE
        /// <summary>
        /// Method returns array of pages for edit policy.
        /// </summary>
        IEnumerable<Mimoza.GUI.IWizardPage> Pages { get; }

        /// <summary>
        /// Method returns array of pages for policy wizard. If this value is null
        /// for wizard will be used IConfigPlugin.Pages.
        /// </summary>
        IEnumerable<Mimoza.GUI.IWizardPage> WizardPages { get; }
//#endif
        }
}
